package com.jiamao.goplay.ui.user.vm;

import androidx.annotation.NonNull;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.MultiItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class ReportPhotoAddrItemVM extends MultiItemViewModel {


    public ReportPhotoAddrItemVM(@NonNull BaseViewModel viewModel) {
        super(viewModel);

    }

    public void showPhoto(int position){

        ((AnonymousReportVM)viewModel).uc.showPhoto.setValue(position);
    }
    //条目的点击事件
    public BindingCommand itemClick = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            if (viewModel instanceof  AnonymousReportVM){
                ((AnonymousReportVM)viewModel).uc.showPhoto.setValue(1);
            }else {
                ((AnonymousReportOtherVM)viewModel).uc.showPhoto.setValue(1);
            }
         //   ((AnonymousReportVM)viewModel).uc.showPhoto.setValue(1);
           // viewModel.startContainerActivity(UserEditUserInfoFragment.class.getCanonicalName());
        }
    });




}
